import globals from 'globals'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import pluginVue from 'eslint-plugin-vue'
import eslintConfigPrettier from 'eslint-config-prettier'

/** @type {import('eslint').Linter.Config[]} */
export default [
  {
    ignores: ['dist-electron/'],
  },
  {
    files: ['**/*.{js,mjs,cjs,ts,vue}'],
  },

  { languageOptions: { globals: globals.browser } },

  pluginJs.configs.recommended,
  ...tseslint.configs.recommended,

  ...pluginVue.configs['flat/essential'],

  eslintConfigPrettier,

  {
    files: ['**/*.{vue,ts,mjs,js}'],

    languageOptions: { parserOptions: { parser: tseslint.parser } },

    rules: {
      'no-multiple-empty-lines': ['error', { max: 1 }],
      // '@typescript-eslint/no-unused-vars': 1,
    },
  },
]
